<template>
  <div class="form-containter">
    <el-tabs type="border-card">
      <div>
        <p class="content-tit">调拨发放查询</p>
        <el-form :label-position="labelPosition" label-width="100px" :model="formData">
          <el-row type="flex" class="row-bg">
            <el-col :span="8">
              <el-form-item label="申请机构" size="mini">
                <el-input v-model="formData.applyCom"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="申请起期" size="mini">
                <el-date-picker type="date" v-model="formData.applyStartDate" placeholder="选择时间"
                                :value-format="'yyyy-MM-dd'"
                                :format="'yyyy-MM-dd'"></el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="申请止期" size="mini">
                <el-date-picker type="date" v-model="formData.applyEndDate" placeholder="选择时间"
                                :value-format="'yyyy-MM-dd'"
                                :format="'yyyy-MM-dd'"></el-date-picker>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" class="row-bg">
            <el-col :span="8">
              <el-form-item label="同意调拨起期" size="mini">
                <el-date-picker type="date" v-model="formData.applyStartDate" placeholder="选择时间"
                                :value-format="'yyyy-MM-dd'"
                                :format="'yyyy-MM-dd'"></el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="同意调拨止期" size="mini">
                <el-date-picker type="date" v-model="formData.applyEndDate" placeholder="选择时间"
                                :value-format="'yyyy-MM-dd'"
                                :format="'yyyy-MM-dd'"></el-date-picker>
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
        <div align="right">
          <el-button type="primary" @click="" icon="el-icon-search">查询</el-button>
        </div>
      </div>
      <div>
        <p class="content-tit">
          <span @click="isShow('isShowSingle')" v-if='isShowSingle'>-</span>
          <span @click="isShow('isShowSingle')" v-else>+</span>调拨列表
        </p>
        <el-table :data="usersList" ref="userTable" @selection-change="handleSelectionChange" style="width: 100%"
                  class='table-common' :highlight-current-row="true" border
                  v-show="isShowSingle">
          <el-table-column label="#" checked="selectionData"
                           type="selection"
                           min-width="6%">
          </el-table-column>
          <el-table-column label="序号" type='index' min-width="8%" align="center"></el-table-column>
          <el-table-column label="申请调入机构" min-width="8%" align="center"></el-table-column>
          <el-table-column prop="dicTypeId" label="单证编码" min-width="9%" align="center"></el-table-column>
          <el-table-column prop="TypeDis" label="单证名称" min-width="9%" align="center"></el-table-column>
          <el-table-column prop="certifyEdition" label="单证版本" min-width="9%" align="center"></el-table-column>
          <el-table-column label="调拨申请数量" min-width="8%" align="center"></el-table-column>
          <el-table-column label="申请操作人" min-width="8%" align="center"></el-table-column>
          <el-table-column label="申请日期" min-width="8%" align="center"></el-table-column>
        </el-table>
        <div class="mar15 " align="right" v-show="isShowSingle">
          <el-pagination
            @current-change="handleCurrentChangeSingle"
            :current-page="selfPage.currentPage"
            :page-size="selfPage.perPage"
            layout="total, prev, pager, next, jumper"
            :total="selfPage.totalSize">
          </el-pagination>
        </div>

      </div>
      <div>
        <p class="content-tit">调拨审批信息</p>
        <el-form :label-position="labelPosition" label-width="100px" :model="formData1">
          <el-row type="flex" class="row-bg">
            <el-col :span="8">
              <el-form-item label="审批结论" size="mini">
                <el-select v-model="formData.code2" clearable filterable placeholder="请选择">
                  <el-option value="86-总部"></el-option>
                  <el-option value="8601-分公司"></el-option>
                  <el-option value="860101-支公司"></el-option>
                  <el-option value="86010101-营销部"></el-option>
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" class="row-bg">
            <el-col span="10">
              <p>原因说明：</p>
              <el-input
                type="textarea"
                :autosize="{ minRows: 2, maxRows: 4}"
                placeholder="请输入内容"
                v-model="textarea2">
              </el-input>
            </el-col>
          </el-row>
        </el-form>

        <div align="right">
          <el-button type="primary" @click="">审批确认</el-button>
        </div>
      </div>
    </el-tabs>
  </div>
</template>

<script>
  export default {
    name: "card-allot-checked",
    data() {
      return {
        isShowSingle: true,
        selfPage: {
          currentPage: 1,
          hasMore: true,
          perPage: 10,
          totalPage: 0,
          totalSize: 0
        },
        labelPosition: 'right',
        dialogTableVisible: false,
        formData: {
          certifyEdition: "",
          applyCom: '',
          applyStartDate: '',
          applyEndDate: '',
        },
        selfPage: {
          currentPage: 1,
          hasMore: true,
          perPage: 10,
          totalPage: 0,
          totalSize: 0
        },
        publicPage: {
          currentPage: 1,
          hasMore: true,
          perPage: 10,
          totalPage: 0,
          totalSize: 0
        },
        appotApplyList: [],
        CertifyCountList: []
      }
    },
    methods: {
      isShow(val) {
        this[val] = !this[val]
      },
      handleSelectionChange(val) {
        this.selectionData = val;
      },
      handleCurrentChangeSingle(num) {
        this.selfFormData.pageNum = num
      },
      handleCurrentChange(num) {
        this.formData.pageNum = num
      },
    }
  }
</script>

<style scoped>

</style>
